<div xmlns="http://www.w3.org/1999/xhtml"
  xmlns:nxthemes="http://nuxeo.org/nxthemes"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:nxu="http://nuxeo.org/nxweb/util"
  xmlns:nxdir="http://nuxeo.org/nxdirectory"
  xmlns:nxl="http://nuxeo.org/nxforms/layout"
  xmlns:c="http://java.sun.com/jstl/core"
  xmlns:a4j="http://richfaces.org/a4j">

  <h3>
    <h:outputText value="#{messages['title.createGroup']}" />
  </h3>

  <h:form id="createGroup" rendered="#{groupManagementActions.allowCreateGroup and notReadOnly}">
    <h:outputScript target="#{pageJsTarget}">
      jQuery(document).ready(function() {
        jQuery('#createGroupView\\:createGroup').focusFirst();
      });
    </h:outputScript>
    <nxl:layout name="group" mode="create" value="#{groupManagementActions.newGroup}" />
    <table class="dataInput">
      <tbody>
        <tr>
          <td>
            <h:outputLabel for="checkbox_createAnother" value="#{messages['createAnother.checkbox']}"/>
            <h:selectBooleanCheckbox id="checkbox_createAnother" title="#{messages['createAnother.checkbox']}"
              value="#{groupManagementActions.createAnotherGroup}">
            </h:selectBooleanCheckbox>
            <h:commandButton
              id="button_save"
              value="#{messages['command.create']}"
              action="#{groupManagementActions.createGroup}"
              styleClass="button">
              <f:ajax execute="@form" render="groupsPanel facesStatusMessagePanel" />
            </h:commandButton>
            <h:commandButton
              action="#{groupManagementActions.toggleShowCreateForm}" immediate="true"
              value="#{messages['command.cancel']}" styleClass="button">
              <f:ajax execute="@this" render="groupsPanel facesStatusMessagePanel" />
            </h:commandButton>
          </td>
        </tr>
      </tbody>
    </table>
  </h:form>

</div>
